package com.eiisan.web.feign;

import com.alibaba.fastjson.JSONObject;
import com.eiisan.base.constant.EiisanServiceList;
import com.eiisan.core.util.api.Result;
import com.eiisan.web.model.dto.PayMentTransacDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description: PayMentTransacToken Feign接口类
 * @author gragonfly
 * @date 2019/7/17
 **/
@FeignClient(value = EiisanServiceList.EIISAN_SERVICE_PAY)
public interface PayMentTransacClientApi {

    /**
     * 根据不同的渠道id(支付方式) 返回不同的支付提交表单
     * @param channelId
     * @param payToken
     * @return
     */
    @GetMapping("/toPayHtml")
    Result<JSONObject> toPayHtml(@RequestParam String channelId, @RequestParam String payToken);

    @GetMapping("/tokenByPayMentTransac")
    Result<PayMentTransacDTO> tokenByPayMentTransac(@RequestParam("token") String token);
}
